{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
 <style>
		@media only screen and (max-width: 760px),(min-device-width: 768px) and (max-device-width:1024px)  {
		table, thead, tbody, th, td, tr { 
			display: block; 
		}
		thead tr { 
			position: absolute;
			top: -9999px;
			left: -9999px;
		}
		td { 
			border: none;
			border-bottom: 1px solid #eee; 
			position: relative;
			padding-left:44% !important; 
			padding-top:10px ;
		}
	    #mytable tr{ margin-bottom:20px;}
		td:before { 
			position: absolute;
			top:10px;
			left:8px;
			width: 45%; 
			padding-right:10px;
			white-space: nowrap;
		}
		    td:nth-of-type(1):before { content: "班级名称"; }
			td:nth-of-type(2):before { content: "班级代码"; }
			td:nth-of-type(3):before { content: "班级科别"; }
			td:nth-of-type(4):before { content: "班级级别"; }
			td:nth-of-type(5):before { content: "班级科目"; }
			td:nth-of-type(6):before { content: "操作"; }
        }
		
	</style>
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
         <form action="" method="POST">
                <div class="box-header with-border">
                    <span class="fa fa-user-plus" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">班级列表</p>
                    <a href="index.php?a=student.classadd&grade_id={%$grade_id%}" class="btn btn-primary btn-sm" style="float:right; color:#fff;"> 新 增 </a>
                </div>
                <div class="box-body">
                     <table class="table table-bordered table-striped"  id="mytable">
                                <thead>
                                    <tr style="background-color:#fcba4b;">
                                        <td>班级名称</td>
                                        <td>班级代码</td>
                                        <td>班级分类</td>
										<td>班级学科</td>
                                        
                                        <td width="180">操作</td>
                                    </tr>	
                                </thead>
								{%foreach from=$class_lists key=key item=value%}
                                    <tr>
                                        <td><input type="checkbox" value="{%$value.class_id%}" name="class_id[]" > {%$value.class_name%}</td>
                                        <td>{%$value.class_code%}</td>
                                        <td>{%$value.classify_name%}</td>
                                        <td>{%foreach from=$value.class_subject key=k item=v%}
												{%$v%}
											{%/foreach%}</td>
										
                                        <td>
                                            <a href="index.php?a=student.classupdate&class_id={%$value.class_id%}&grade_id={%$value.grade_id%}" class="btn btn-warning btn-xs"> 修  改 </a>
                    						<a href="index.php?a=student.classallot&class_id={%$value.class_id%}&grade_id={%$grade_id%}" class="btn btn-primary btn-xs"> 学科分配 </a>
                                            <a href="index.php?a=student.classdel&class_id={%$value.class_id%}&grade_id={%$grade_id%}" class="btn btn-danger btn-xs" onclick="if(confirm('警告！确认删除信息?会自动删除学生')==false)return false;">
                                             删 除 
                                             </a>
                                        </td>
                                    </tr>
                               	{%/foreach%}
                                <tbody>
                            	</tbody>
                        </table> 
				</div><!--box-body -->
               <div class="box-footer text-center">
                    <div class="form-group">
                          <label for="inputPassword3" class="col-sm-2 control-label text-right" style="font:13px; font-weight:400; margin:0;">班级分类:</label>
                          <div class="col-sm-2">
                             <select class="form-control" name="classify_id">
								<option value="classify_id">请选择</option>
								{%foreach from=$classify_lists key=key item=value%}
                                <option value="{%$value.classify_id%}">{%$value.classify_name%}</option>
								{%/foreach%}
							 </select>   
                          </div>
                     </div>
 
                    <div style="margin:16px; clear:both;">
                     <button type="submit" class="btn btn-primary">保 存</button>
                    </div>
                    {%$page%} 
               </div>
               </form>
			   
           </div><!--box box-default box-solid-->
      </section>   
      </div><!--row-->
    </section>
 </div>
 {%include file="index.footer.tpl.php"%}

